1. Field of the Invention
The present invention relates to an image generator, and in particular to a computer image generator suitable for generating information in real time from which an image can be derived for display in for example a flight simulator.
2. Related Art
Real time image generators for flight simulators are used to simulate images which are presented to pilots who are positioned in a mock aircraft cockpit. The intended viewer of the image produced by the system, that is the simulator "pilot", looks out through an imaginary window into a three-dimensional (3-D) world defined by information stored as geometrical and other characteristic attribute data in a main database. A line drawn from the eyepoint through the window intersects a point in the 3-D world. The colour and intensity of that point must be "painted" on the window at the point of intersection of that line with the window.
The displayed image is made up from a series of picture elements (pixels) each of which is of uniform colour and intensity, the colour and intensity of each pixel being a function of the position of the eyepoint relative to the 3-D world which the stored data represents. In a real time display where hundreds of thousands of pixels must be updated sufficiently quickly to avoid jumping of the image, it is necessary to perform many millions of calculations per second to maintain image fidelity.
The position of the eyepoint relative to the database changes over time in response to the manipulation of the flight controls of the simulated aircraft. At any point in time the simulator produces an output indicating the eyepoint position in world space coordinates, that is the coordinate system of the database, and indicating the viewing direction, that is a vector drawn from the pilot's eyepoint through the centre of the viewing window. The database stores data identifying the position and orientation of a large number of features that may contribute to the final image. The image generator calculates which of the features is visible for the given eyepoint, the position of the boundaries of the features relative to the viewing window, and the attributes such as colour and intensity of the visible features. Occultation of one feature by another must be taken into account, and in high quality systems the effects of one translucent feature occulting another must also be taken into account.
The content of the database is used to derive the colour and intensity information for each pixel of the image to be displayed on a screen placed in front of the simulator pilot. The centre of each pixel is on a unique predetermined imaginary viewing line extending from the eyepoint to the screen and notionally extending through the screen onto the surface of the model defined in the database. This means that the world space coordinate system of the database must be transformed using the eyepoint coordinates into a coordinate system having the eyepoint as its origin, that is an eyepoint space coordinate system, and the information must then be transformed from eyepoint space into a screen space coordinate system. The screen space coordinate system is two dimensional, having its origin at the centre of the display screen. These transformations enable the surface areas of the modelled features which determine the colour and intensity of each pixel (for which the screen space coordinates are known) to be determined. Once the features contributing to a particular pixel have been identified, the colour, intensity and other attributes of those features can be obtained from the database and appropriate calculations performed to determine the final displayed colour and intensity of the pixel.
If a high quality image is to be achieved, the final pixel colour and intensity must be based on a number of samples of the contributing features taken at sampling points distributed across each pixel. For each feature making a contribution to an image it is necessary to determine whether or not that feature overlaps each point in screen space corresponding to a sampling point.
In most known CIG systems, the world space model is defined as a series of polygonal features. Light point features can also be displayed in some systems. In the case of polygonal features, each polygon is described in the database by the world space coordinates of at least its vertices, and these geometrical attributes must be transformed into screen space coordinates to take account of the position and orientation of the eyepoint. This involves an initial world space to viewpoint space transformation, followed by a viewpoint space to screen space transformation. The transformations are computationally intensive operations but do enable realistic images to be displayed. In the case of a light point feature, it may be described in the database by for example a position (coordinate of the light point centre) in world space. The position is transformed to screen space, and the feature can then be displayed on a circular area of the screen centred on the transformed position and having a radius which is a function of range, that is distance from the eyepoint.
CIG systems are known which can simulate the visual effects of landing lights. For example, U.S. Pat. No. 4,511,337 describes a system which is capable of simulating the illumination of the ground resulting from light carried by an aircraft, including variations in the position, shape and size of the area illuminated with variations in the altitude and attitude of the aircraft. This known system essentially displays a conic section and can produce acceptable results when simulating the illumination of a planar ground surface, e.g. a runway. In common with other attempts to simulate landing lights however this known system cannot produce acceptable results when landing lights are required to illuminate other than the ground plane. For example, if an aircraft approaches a terminal building, the "illuminated area" does not follow walls of the building but rather "illuminates" the ground plane within the building. Striking visual cues are thus lost or gross errors appear in the simulated scene.
Another problem associated with the simulation of aircraft and other vehicle lights is that of fog illumination. In some CIG systems, it is possible to simulate the effects of fog in obscuring the visibility of model features viewed through the fog by modulating the colour and intensity of the feature in accordance with the colour and density of the fog and the distance between the observer and the feature. In the case of vehicle lights however a great deal of the visible effects of the lights results from scattering of light back to the observer in the vehicle.